package com.stx.test.serialize;

import java.io.*;

/**
 * 测试serialVersionUID不一致
 */
public class User implements Serializable {
    // 显式声明 serialVersionUID
    private static final long serialVersionUID = 2L;
    
    private String name;
    private int age;
    
    public User(String name, int age) {
        this.name = name;
        this.age = age;
    }
    
    // getters and toString
    public String getName() { return name; }
    public int getAge() { return age; }
    
    @Override
    public String toString() {
        return "User{name='" + name + "', age=" + age + "}";
    }
}